{include file=$header_start}
{strip}
<script src="{$siteroot}/includes/js/admin/addtestimonial.js" type="text/javascript"></script>
{/strip}
{include file=$header_end}
 <div class="contain">
      {include file=$left_menu}      
      <div class="right_contain">
        
         <div class="heading_box">Edit Testimonials</div>
         <div class="whitebox">
         <!--Message Div Start-->
         {if $msg}
         <div class="masg_div">
           {$msg}
         </div>
         {/if}
         <!--Message Div End-->
         
         <form name="frmTestimonial" id="frmTestimonial" action="" method="post">
          <input type="hidden" id="page" name="page" value="{$page}" />
         <div style="min-height:250px;">
          <!--Form Contain start-->
           
           <div class="form_fieldbox"> 
           		<dl>
           		<dt>Select User</dt>
                <dd>
                	<select name="user" id="user" class="input">
                    	<option value="">Select User</option>
                        {section name=i loop=$users}
                        	{assign var=username value=$users[i].first_name|cat:" "|cat:$users[i].last_name}
                        	<option value="{$username}" {if $testimonialArray.user eq $users[i].id} selected="selected"{/if}>{$username}</option>
                        {/section}
                	</select>
                </dd>            
              	<div class="clear"></div>
             </dl>                             
             <dl>
              <dt>Testimonials Content: <span class="error">*</span></dt>
              <dd>{php}              	
                $testimonialObj = new Model_Testimonials();
              	$testimonial_id=base64_decode($_GET['id']);              
			  	$cmsresult=$testimonialObj->getTestimonialDetailsById($testimonial_id);
                
             	include_once(INCLUDE_FCKEDITOR);
                $sBasePath 			= 	$_SERVER[ 'PHP_SELF' ] ;
                $sBasePath			=	FCKEDITOR_BASEPATH;
                $oFCKeditor 		= 	new FCKeditor('testimonial_content');
                $oFCKeditor->BasePath 	= 	$sBasePath;
                $oFCKeditor->Height = '500' ;
                $oFCKeditor->Width = '650' ;
                $oFCKeditor->Value	=	trim($cmsresult['testimonial_content']);						
                $oFCKeditor->Create();
              {/php}
              </dd>
              <div class="clear"></div>
             </dl>
              
            </div>
            
            <!--Form Contain end--> 
          
           <!--Button here start-->
           <div>
            <span><input type="submit" class="admin_btn" value="Submit" name="edittestimonial_btn" id="edittestimonial_btn"/></span>
            <span><input type="button" class="admin_btn" value="Cancel" onclick="window.location='{$siteroot}/admin/home.php?q=testimonials&page={$smarty.get.page}';"/></span>
           </div>
            <!--Button here end-->
  
         </div>
         </form>
         
         </div>
        </div>
      
      
      <!--right_contain end-->
      <div class="clear"></div>
    </div>
    
{include file=$footer}